package com.walogger.dao;

import java.util.ArrayList;
import java.util.List;

import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.orm.hibernate4.support.HibernateDaoSupport;
import org.springframework.stereotype.Repository;

import com.walogger.domain.Employee;

@Repository
public class SampleDAO extends HibernateDaoSupport {

	@Autowired
	public void setSession(SessionFactory sessionFactory) {
		this.setSessionFactory(sessionFactory);
	}
	public List<Employee> getAll() {
		return getHibernateTemplate().loadAll(Employee.class);
	}
 }
